<?php
/*此段整个在if($isfirst) {}的范围内*/
 if(!empty($TitleImgEnable)){ ?>
<div class="form-group row">
    <label class="col-2 form-control-label">标题图片:</label>
    <div class="col-10">
        <div><input type="text" class="form-control changeoversee" placeholder="帖子的标题图片,默认为正文第一张图片" name="firstimg" id="firstimg" value="<?php echo $firstimg;?>" /></div>
        <div><img src="<?php echo $firstimg;?>" id="firstimgview" /></div>
    </div>
</div>
<?php } ?>
<div class="form-group row"><label class="col-2 form-control-label">文章来源:</label><div class="col-10"><input type="text" class="form-control changeoversee" placeholder="文章来源" name="source" value="<?php echo $source;?>" /></div></div>
<div class="form-group row"><label class="col-2 form-control-label">来源链接:</label><div class="col-10"><input type="text" class="form-control changeoversee" placeholder="来源链接" name="sourceurl" value="<?php echo $sourceurl;?>" /></div></div>
<div class="form-group row"><label class="col-2 form-control-label">过期时间:</label>
    <div class="input-group date col-10" id="datetimepicker1" data-target-input="nearest">
        <input type="text" class="form-control datetimepicker-input changeoversee" data-target="#datetimepicker1"  placeholder="会定期清理过期文章,空为永不过期" name="expired" value="<?php echo $expiredFmt;?>" />
        <div class="input-group-append" data-target="#datetimepicker1" data-toggle="datetimepicker">
            <div class="input-group-text"><i class="fa fa-calendar"></i></div>
        </div>
    </div>
</div>
<?php if($IsThreadExtension){
    if($IsAdjustPostSortRank){
?>
<div class="form-group row"><label class="col-2 form-control-label">排序指数:</label><div class="col-4"><input type="text" class="form-control changeoversee" placeholder="排序指数,建议范围±16" name="trank" value="<?php echo $trank;?>" /></div></div>
<?php } ?>
<div class="form-group row" id="keywordsrow"><label class="col-2 form-control-label">关键词:</label>
    <div class="input-group col-10"><input type="text" class="form-control changeoversee" placeholder="请输入贴子META关键词，多个以逗号分隔,【注意】:单个空格不作为分隔符" name="keywords" id="keywords" value="<?php echo $keywords;?>" />
        <span class="input-group-btn">
                <button class="btn btn-toolbar" type="button" id="autopickupkw" onclick="autopickupkeyword('keywords',(typeof autopickupkeyword_cfg !='undefined'?autopickupkeyword_cfg:null))">自动提取</button>
        </span>
    </div>
</div>
<div class="form-group row" id="metadescrow"><label class="col-2 form-control-label">META描述:</label><div class="col-10"><textarea class="form-control changeoversee" placeholder="请输入贴子META描述信息" name="metadesc" value="<?php echo $metadesc;?>" style = "height:100px;"><?php echo $metadesc;?></textarea></div></div>
<div class="form-group row" id="relatedlinksrow"><label class="col-2 form-control-label">关联文章:</label>
    <div class="col-10">
        <div><textarea class="form-control changeoversee" placeholder="<?php echo $relatedlinks_placeholder;?>"
                       name="relatedlinks" value="<?php echo $relatedlinks;?>"
                       style="height:100px;"><?php echo $relatedlinks;?></textarea></div>
        <div class="input-group"><input type="text" class="form-control changeoversee" placeholder="允许关联的版块ID列表,以逗号分隔,留空或者0表示全选,-1为不关联版块"
                    name="relatedfids" id="relatedfids" value="<?php echo $relatedfids;?>"/>
            <span class="input-group-btn">
                <button class="btn btn-toolbar" type="button" id="selectfidsbtn">选择版块</button>
            </span>
        </div>
        <div class="btn-group" data-toggle="fidselects" id="ckg_fidselects">
            <label class="btn btn-secondary"><input type="checkbox" value="0">全选</label>
            <?php foreach ($forumlist_allowthread as &$forum_2) { ?>
            <label class="btn btn-secondary"><input type="checkbox" value="<?php echo $forum_2['fid']; ?>"><?php echo $forum_2['fid'].':'.$forum_2['name']; ?></label>
            <?php } ?>
            <label class="btn btn-secondary"><input type="checkbox" value="-1">不关联版块</label>
        </div>
    </div>
</div>
<div class="form-group row" id="editornoterow"><label class="col-2 form-control-label">编者按:</label><div class="col-10"><textarea type="text" class="form-control changeoversee" placeholder="编者按" name="editornote" value="<?php echo $editornote;?>" style = "height:100px;"><?php echo $editornote;?></textarea></div></div>
<div class="form-group row" id="reviseerrrow"><label class="col-2 form-control-label">修订意见:</label><div class="col-10"><textarea type="text" class="form-control changeoversee" placeholder="修订意见,请在处理完后删除此内容" name="reviseerr" value="<?php echo $reviseerr;?>" style = "height:100px;" title="修订意见,请在处理完后删除此内容"><?php echo $reviseerr;?></textarea></div></div>
<?php if($IsAdjustViewTemplate){ ?>
<div class="form-group row"><label class="col-2 form-control-label">展示模板:</label><div class="col-6"><input type="text" class="form-control changeoversee" placeholder="在前台展示的模板文件路径,空为系统默认模板" name="viwetemplate" id="viwetemplate" value="<?php echo $viwetemplate;?>" /></div>
<?php if(isset($ThreadViewTemplateList) && !empty($ThreadViewTemplateList)){ ?>
    <div class="dropdown col-4">
        <button type="button" id="threadviewtplbtn" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown">选择前台模板</button>
        <ul class="dropdown-menu" aria-labelledby="threadviewtplbtn">
			<li class="dropdown-item" data-path="" onclick="fillthreadviewtpl('viwetemplate',this);">系统默认</li>
            <?php foreach ($ThreadViewTemplateList as $tplname => &$tvtplpaths) { ?>
            <li class="dropdown-item" data-path="<?php echo implode(',',$tvtplpaths); ?>" onclick="fillthreadviewtpl('viwetemplate',this);"><?php echo $tplname; ?></li>
            <?php } ?>
        </ul>
    </div>
    <?php } ?>
</div>
<?php }} ?>